<?php

// 定义应用路由
use fastphp\facade\Router;

// 代码生成器路由
Router::get('/admin/generator', 'Generator','index');
Router::get('/admin/article', 'Article','index');
Router::get('/admin/article/edit', 'Article','edit');
Router::post('/admin/generator/getTableInfo', 'Generator','getTableInfo');
Router::post('/admin/generator/generate', 'Generator','generate');

// 基本路由组，带前缀
Router::group('/admin', function($router) {
    $router->get('/', 'Admin', 'index', 'admin.index');
    $router->get('/users', 'Admin', 'users', 'admin.users');
});
